package com.auto.sns.core.action;

import java.util.Date;

import com.auto.sns.core.domain.SnsCoreActivity;
import com.auto.sns.core.domain.SnsCoreVote;
import com.auto.sns.core.service.SnsCoreServiceFactory;
import com.auto.tools.AutoUtils;
import com.system.common.BaseAction;
import com.system.util.BeanUtil;
import com.system.util.DateUtil;
import com.system.util.JsonUtil;

/**
 * 投票action
 * @author wsh
 *
 */
public class SnsCoreVoteAction extends BaseAction {
	/**
	 * 
	 */
	private static final long serialVersionUID = -7098197940638914462L;

	/**
	 * 添加投票
	 * @throws Exception 
	 */
	public void saveOrUpdateSnsCoreVote() throws Exception{
		String data = getRequest().getParameter("data");
		SnsCoreVote snsCoreVote = (SnsCoreVote)JsonUtil.jsonToBean(data, SnsCoreVote.class);
		
		snsCoreVote.setPubDate(new Date());
		snsCoreVote.setPubUserCode(AutoUtils.getUserCode());
		snsCoreVote.setPubUserName(AutoUtils.getUserCode());
		
		SnsCoreServiceFactory.snsCoreInfoService.saveOrUpdateSnsCoreVote(snsCoreVote);
	}
	
	/**
	 * 获取当前投票列表
	 */
	public void getVoteInfoList(){
		
	}
	
	/**
	 * 获取某个投票详细信息
	 */
	public void getVoteInfo(){
		
	}
	
	/**
	 * 处理投票
	 */
	public void voteInfoManager(){
		
	}
	
	/**
	 * 回复投票
	 */
	public void replyVoteInfo(){
		
	}
	
	/**
	 * 推荐投票
	 */
	public void commendVoteInfo(){
		
	}
	
	/**
	 * 收藏投票
	 */
	public void collectionVoteInfo(){
		
	}
	
	/**
	 * 删除投票
	 */
	public void deleteVoteInfo(){
		
	}
}